-- GENERATED SPELL FOR [Oblivion Mage] --


function spell0_25597(pUnit, Event) --@Flame Buffet,n/a--
pUnit:FullCastSpellOnTarget(46279,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_25597', 22000, 1)
end

function spell1_25597(pUnit, Event) --@Polymorph,n/a--
pUnit:FullCastSpellOnTarget(46280,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_25597', 16000, 1)
end

function Sorts_25597(pUnit, Event)
local choix_sorts_25597 = math.random(0, 1)
if choix_sorts_25597 == 0 then
pUnit:RegisterEvent('spell0_25597', 1, 1)
end
if choix_sorts_25597 == 1 then
pUnit:RegisterEvent('spell1_25597', 1, 1)
end
end

function mob25597_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_25597', math.random(1500, 3000), 1)
end

function mob25597_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25597_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25597_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(25597, 1, 'mob25597_Action')
RegisterUnitEvent(25597, 2, 'mob25597_Leave')
RegisterUnitEvent(25597, 3, 'mob25597_Kill')
RegisterUnitEvent(25597, 4, 'mob25597_Die')
